#include <stdio.h>
#include <unistd.h>
#include <string.h>

void Fun()
{
  char buf[0x100];
   while ( 1 )
  {
    memset(buf, 0, 100);
    puts("Leave your message:");
    read(0, buf, 100);
    printf("%s\n",buf);
    break;
  }
  for(int i=0;;i++)
  {
    if(strlen(buf)<5)
    {
      puts("Leave your message:");
      strncat(buf,"Leave your message:",20);
    }
    else
    {
      memset(buf, 0, 0x100);
      read(0, buf, 0x100);
      printf(buf);
    } 
  }
}

int main()
{
  setvbuf(stdout, 0, 2, 0);
  setvbuf(stdin, 0, 1, 0);
  puts("No sys,No bin,Just fmtstr");
  Fun();
  return 0;
}
